function [ C ] = DotProd(A,B)
%DotProd calculates dot product
%   example for error handling

%We could do this if we want to return error:

%if nargin()<2
%    error('You must have 2 inputs')
%end

%Or if we want to set a default
%see 'help nargin'
if nargin()<2
    B=A;
end

%Size check
if length(A)~=length(B)
    error('A and B must be the same length')
end
A*B


end

